1. Field of the Invention
The present invention relates to an apparatus and a method for drawing a three-dimensional graphics model generated by a computer.
2. Description of the Related Art
Recently, three-dimensional computer graphics (3DCG) are widely used in a mechanical CAD (computer-aided design) system, a virtual reality simulation system such as a graphics game, animation, walk-through, etc., and many other fields.
An occlusion culling method has been well-known as one of the conventional methods for drawing 3DCG at a high speed (U.S. Pat. No. 5,751,291 May/1998 Olsen et al., U.S. Pat. No. 5,613,050 March/1997 Hochmuth et al.). In this method, a CG model (object) of a thing to be drawn is covered with a basic figure such as a rectangular parallelepiped, etc. Using the basic figure for the object, it is determined whether or not the basic figure has been occluded by another basic figure.
To be occluded by another figure means that a figure is hidden by the other figure. A drawing operation can be performed at a higher speed by omitting to draw an object in an occluded basic figure.
However, the above described occlusion culling method has the following problem.
When an object having a complicated shape is to be drawn in this method in which an object is covered with a basic figure such as a rectangular parallelepiped, etc., it is not rare to overlook a state in which one object is hidden by another, to omit an object not hidden by another. Therefore, this method is suitable for a system such as a walk-through system, etc. for processing an object having a relatively simple shape.
However, on a mechanical designing field, there can be a complicated-shaped object made of several hundred thousand polygons. In such a case, a correct drawing cannot be expected in the occlusion culling method using basic figures. Therefore, an occlusion culling method capable of drawing a 3D model made of a large number of polygons at a high speed, improving the update rate of a computer screen, and smoothly rotating and moving the model is strongly demanded.
The present invention aims at providing a drawing apparatus and a drawing method for performing a correct and rapid occlusion culling process in a CG system which processes a complicated shape such as a mechanical CAD.
According to the first aspect of the present invention, the drawing apparatus includes a shape information storage unit, a table unit, a virtual image storage unit, a discrimination unit, and an occlusion culling unit, and displays a plurality of objects.
The shape information storage unit stores shape information about the plurality of objects. The table unit stores plural pieces of color information one-to-one virtually corresponding to the plurality of objects. The virtual image storage unit stores virtual color image information drawn based on the information in the shape information storage unit and the table unit. The discrimination unit discriminates the occlusion of an object by scanning the virtual color image information. The occlusion culling unit omits to display an object discriminated as being occluded among the plurality of objects.
According to the second aspect of the present invention, the drawing apparatus includes a shape information storage unit, a table unit, a virtual image storage unit, a discrimination unit, and an occlusion culling unit, and displays a plurality of objects.
The shape information storage unit stores shape information about the plurality of objects. The table unit stores plural pieces of identification information one-to-one virtually corresponding to the plurality of objects. The virtual image storage unit stores virtual image information in which each object is drawn with corresponding identification information based on information in the shape information storage unit and the table unit. The discrimination unit discriminates the occlusion of an object by scanning the virtual image information. The occlusion culling unit omits to display an object determined as being occluded among the plurality of objects.
According to the third aspect of the present invention, the drawing apparatus includes a discrimination unit, a reduction unit, and a display unit, and displays a plurality of objects.
The reduction unit reduces the number of geometry primitives forming the plurality of objects. The discrimination unit discriminates the occlusion of an object using objects whose number of geometry primitives is reduced. The display unit displays an object discriminated as not being occluded among the plurality of objects using geometry primitives larger in number than the geometry primitives used in occlusion discrimination.